Fix up selection of conversion functions for MSB machines:
authorOwen Taylor <otaylor@redhat.com>
Fri, 24 Jun 2005 15:06:29 +0000 (15:06 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Fri, 24 Jun 2005 15:06:29 +0000 (15:06 +0000)
2005-06-24  Owen Taylor  <otaylor@redhat.com>

        * gdk/gdkrgb.c (gdk_rgb_select_conv): Fix up selection of
        conversion functions for MSB machines: convert_0888[_br]
        now work on bytes so are endian independent.
        (Reported by David Zeuthen)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gdk/gdkrgb.c

index d4e8630f89b6219c502e3555142aa77490472001..69b608918707e4ef82cb9dbf20465d36f38ed7b5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-06-24  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkrgb.c (gdk_rgb_select_conv): Fix up selection of
+       conversion functions for MSB machines: convert_0888[_br]
+       now work on bytes so are endian independent. 
+       (Reported by David Zeuthen)
+
 2005-06-24  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_scroll_hpages): Don't
index d4e8630f89b6219c502e3555142aa77490472001..69b608918707e4ef82cb9dbf20465d36f38ed7b5 100644 (file)
@@ -1,3 +1,10 @@
+2005-06-24  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkrgb.c (gdk_rgb_select_conv): Fix up selection of
+       conversion functions for MSB machines: convert_0888[_br]
+       now work on bytes so are endian independent. 
+       (Reported by David Zeuthen)
+
 2005-06-24  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_scroll_hpages): Don't
index d4e8630f89b6219c502e3555142aa77490472001..69b608918707e4ef82cb9dbf20465d36f38ed7b5 100644 (file)
@@ -1,3 +1,10 @@
+2005-06-24  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkrgb.c (gdk_rgb_select_conv): Fix up selection of
+       conversion functions for MSB machines: convert_0888[_br]
+       now work on bytes so are endian independent. 
+       (Reported by David Zeuthen)
+
 2005-06-24  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtktextview.c (gtk_text_view_scroll_hpages): Don't
index d78584216d2125aad866feba4373aeff8981b114..a7aa8920baa08b0dcc936a9941728e251fd49e0a 100644 (file)
@@ -3135,17 +3135,17 @@ gdk_rgb_select_conv (GdkRgbInfo *image_info)
           ((mask_rgb && byte_order == GDK_MSB_FIRST) ||
            (mask_bgr && byte_order == GDK_LSB_FIRST)))
     conv = gdk_rgb_convert_888_msb;
-#if G_BYTE_ORDER == G_BIG_ENDIAN
   else if (bpp == 32 &&
           (depth == 24 || depth == 32) &&
           vtype == GDK_VISUAL_TRUE_COLOR &&
-          (mask_rgb && byte_order == GDK_LSB_FIRST))
+          (mask_rgb && byte_order == GDK_MSB_FIRST))
     conv = gdk_rgb_convert_0888_br;
   else if (bpp == 32 &&
           (depth == 24 || depth == 32) &&
           vtype == GDK_VISUAL_TRUE_COLOR &&
-          (mask_rgb && byte_order == GDK_MSB_FIRST))
+          (mask_rgb && byte_order == GDK_LSB_FIRST))
     conv = gdk_rgb_convert_0888;
+#if G_BYTE_ORDER == G_BIG_ENDIAN
   else if (bpp == 32 && depth == 24 && vtype == GDK_VISUAL_TRUE_COLOR &&
           (mask_bgr && byte_order == GDK_MSB_FIRST))
     conv = gdk_rgb_convert_8880_br;
@@ -3156,16 +3156,6 @@ gdk_rgb_select_conv (GdkRgbInfo *image_info)
           (mask_rgb && byte_order == GDK_MSB_FIRST))
     conv = gdk_rgb_convert_8880_br;
 #else
-  else if (bpp == 32 &&
-          (depth == 24 || depth == 32) &&
-          vtype == GDK_VISUAL_TRUE_COLOR &&
-          (mask_rgb && byte_order == GDK_MSB_FIRST))
-    conv = gdk_rgb_convert_0888_br;
-  else if (bpp == 32 &&
-          (depth == 24 || depth == 32) &&
-          vtype == GDK_VISUAL_TRUE_COLOR &&
-          (mask_rgb && byte_order == GDK_LSB_FIRST))
-    conv = gdk_rgb_convert_0888;
   else if (bpp == 32 && depth == 24 && vtype == GDK_VISUAL_TRUE_COLOR &&
           (mask_bgr && byte_order == GDK_LSB_FIRST))
     conv = gdk_rgb_convert_8880_br;